package com.mdlib.helper.app;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by librabin on 16/11/25.
 */

public class AppConfig {

    private final static String APP_CONFIG = "app_config";

    private final static String HAVE_LAUNCH = "has_launcher";



    public static void saveHaveLauncher(boolean isLauncher) {
        SharedPreferences settings = AppContext.getInstance().getSharedPreferences(APP_CONFIG,
                Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = settings.edit();

        editor.putBoolean(HAVE_LAUNCH, isLauncher);

        editor.apply();
    }

    public static boolean haveLanch() {
        SharedPreferences sp = AppContext.getInstance().getSharedPreferences(APP_CONFIG,
                Context.MODE_PRIVATE);
        return sp.getBoolean(HAVE_LAUNCH, false);
    }

}
